<div id="menu">
    <ul>
      <li><a href="/" class="current">Trang chủ</a></li>
    
      <li><a href="/photo.php">Photo anbulm</a></li>
      <li><a href="/thanhvien.php">Danh sách thành viên</a></li>
    </ul>
     <div id="login_box"> 
     <?php
 if ( !$_SESSION['user_id'] )

 {

    echo('
      <form action="login.php?act=do" method="post">
        <label>Tên đăng nhập: </label>
      <input type="text" name="username" value="" size="9">
        &nbsp;&nbsp;
        <label>Mật khẩu:</label>
      <input type="password" name="password" value="" size="9">
        <input class="button" type="submit" name="Submit" value="" />
      </form>
  
   ');

  echo "| <a href='register.php'>Đăng kí!</a>";
   }else

  {
         echo '<strong><span style="color: rgb(255, 0, 0);">Chào bạn ';?> 

    <?php
    $user_id = intval($_SESSION['user_id']);
    $sql_query = @mysql_query("SELECT * FROM members WHERE id='{$user_id}'");
    $member = @mysql_fetch_array( $sql_query ); 

    echo "{$member['Name']}"; 

   echo '</span></strong>';

   echo "  |  <a href='suathongtin.php'>Sửa thông tin</a> | ";

   if ($member['admin']!="0")  

   echo "<a href='admin.php'>Trang quản trị.</a>";

    

    echo "&nbsp;|&nbsp;<a href='thoat.php'>Thoát ra!</a>";
  }
  ?>

 
  </div>
  </div>
 